
export const TYPE = 1

export const middleSearchConfig = [
  {
    type: 'input',
    value: '',
    label: '',
    keyIndex: 'name',
    placeholder: '请输入栏目名称',
    span: 8,
    visible: true,
    size: 'small'
  },
  {
    type: 'select',
    value: '',
    label: '',
    keyIndex: 'status',
    placeholder: '请选择发布状态',
    span: 8,
    visible: true,
    size: 'small',
    options: [
      {
        label: '已发布',
        value: '1'
      },
      {
        label: '未发布',
        value: '0'
      }
    ]
  }
]
export const leftTableConfig = {
  colums: [
    {
      props: 'id',
      label: 'ID',
      slot: 'id'
    },
    {
      props: 'title',
      label: '标题',
      slot: 'title',
      width: '200'
    },
    {
      props: 'newsTypeName',
      label: '栏目'
    },
    {
      props: 'creator',
      label: '创建人'
    },
    {
      props: 'statusName',
      label: '发布状态'
    },
    {
      props: 'viewNum',
      label: '点击量'
    },
    {
      props: 'releaseTimeStr',
      label: '发布时间',
      sortable: true
    },
    {
      props: 'updateTimeStr',
      label: '更新时间',
      sortable: true
    },
    {
      props: 'updater',
      label: '最近操作'
    }
  ],
  showSelection: true
}

export const recycleBinTableConfig = {
  colums: [
    {
      props: 'id',
      label: 'ID',
      slot: 'id'
    },
    {
      props: 'title',
      label: '标题',
      width: '200'
    },
    {
      props: 'newsTypeName',
      label: '栏目'
    },
    {
      props: 'creator',
      label: '创建人'
    },
    {
      props: 'viewNum',
      label: '点击量'
    },
    {
      props: 'releaseTimeStr',
      label: '发布时间',
      sortable: true
    },
    {
      props: 'updateTimeStr',
      label: '删除时间',
      sortable: true
    },
    {
      props: 'updater',
      label: '最近操作'
    }
  ],
  showSelection: true
}

export const addPopFormConfig = [
  {
    type: 'input',
    value: '',
    label: '标题',
    keyIndex: 'title',
    placeholder: '请输入标题',
    rules: { required: true, message: '请输入标题', trigger: 'change' },
    span: 24,
    visible: true,
    inputWidth: '800px',
    maxlength: 50,
    inputType: 'text'
  },
  {
    type: 'select',
    value: '',
    label: '栏目',
    keyIndex: 'typeId',
    placeholder: '请选择栏目',
    rules: { required: true, message: '请选择栏目', trigger: 'change' },
    span: 24,
    visible: true,
    inputWidth: '800px',
    options: []
  },
  {
    type: 'uploadImg',
    value: '',
    label: '封面',
    keyIndex: 'headUrl',
    span: 24,
    visible: true,
    tips: ',建议尺寸为 160px * 220px 或等比例缩放图片'
  },
  {
    type: 'radio',
    value: '0',
    label: '状态',
    keyIndex: 'status',
    span: 24,
    options: [
      // status === '0'">发布
      {
        value: '1',
        label: '发布'
      },
      {
        value: '0',
        label: '暂不发布'
      }
    ]
  },
  {
    type: 'textarea',
    value: '',
    label: '副标题',
    keyIndex: 'subtitle',
    placeholder: '请输入副标题',
    rules: { required: true, message: '请输入副标题', trigger: 'change' },
    span: 24,
    visible: true,
    inputWidth: '800px',
    maxlength: 300,
    inputType: 'text',
    autosize: { minRows: 1, maxRows: 3 }
  },
  {
    type: 'textarea',
    value: '',
    label: '文章摘要',
    keyIndex: 'remark',
    placeholder: '请输入文章摘要',
    span: 24,
    visible: true,
    rules: { required: true, message: '请输入文章摘要', trigger: 'change' },
    inputWidth: '800px',
    maxlength: 300,
    autosize: { minRows: 2, maxRows: 7 }
  },
  {
    type: 'uploadImg',
    value: '',
    label: '小程序分享图片',
    keyIndex: 'appletUrl',
    span: 24,
    visible: true
  }
]
export const addColumnConfig = [
  {
    type: 'input',
    value: '',
    label: '名称',
    keyIndex: 'name',
    placeholder: '输入名称。10字以内',
    span: 24,
    rules: { required: true, message: '请输入名称', trigger: 'change' },
    visible: true,
    inputWidth: '300px',
    inputRef: 'name',
    maxlength: 10,
    showWordLimit: true,
    inputType: 'text'
  },
  {
    type: 'radio',
    value: '0',
    label: '发布状态',
    keyIndex: 'status',
    span: 24,
    options: [
      {
        value: '1',
        label: '发布'
      },
      {
        value: '0',
        label: '不发布'
      }
    ]
  }
]

export const newsColumntableConfig = {
  colums: [
    {
      props: 'name',
      label: '栏目名称'
    },
    {
      props: 'childNum',
      label: '资讯数'
    },
    {
      props: 'releaseTimeStr',
      label: '上架时间',
      sortable: true
    },
    {
      props: 'updateTimeStr',
      label: '最近更新时间',
      sortable: true
    },
    {
      props: 'statusName',
      label: '发布状态'
    },
    {
      props: 'creator',
      label: '创建人'
    }
  ],
  showSelection: false
}

export const recycleBinSearch = [
  {
    type: 'input',
    value: '',
    label: '',
    keyIndex: 'name',
    placeholder: '请输入标题',
    span: 6,
    visible: true,
    size: 'small'
  },

  {
    type: 'select',
    value: '',
    options: [],
    label: '',
    keyIndex: 'typeId',
    placeholder: '请选择栏目',
    span: 6,
    multiple: false,
    size: 'small'
  },
  {
    type: 'select',
    value: '',
    options: [
      {
        value: '0',
        label: '未发布'
      },
      {
        value: '1',
        label: '发布'
      }
    ],
    label: '',
    keyIndex: 'status',
    placeholder: '请选择发布动态',
    span: 6,
    multiple: false,
    size: 'small'
  }
]
